<template>
	<view>
		<u-sticky offset-top="0" v-if="record">
			<view style="background: #F8F8F8;padding: 20rpx;font-size: 28rpx;padding-bottom: 0;">
				<view style="display: flex;justify-content: space-between;margin-bottom: 30rpx;">
					<view style="display: flex;align-items: center;">
						<view>{{record.name}}</view>
						<view style="font-weight: bold;color: #483D8B;">（{{record.empname}}）</view>
					</view>
					<view>{{record.reportingMonth}}</view>
				</view>
				<u-subsection :list="list" :current="current" @change="sectionChange"
					style="margin-bottom: 30rpx;"></u-subsection>
			</view>
		</u-sticky>

		<view style="padding: 30rpx;font-size: 28rpx;padding-bottom: 50px;padding-top: 0;" v-if="record">

			<view class="list-item" v-if="current==0">
				<view style="margin-bottom: 10px;display: flex;align-items: center;">
					<view style="margin-right: 20rpx;">个人信息</view>
					<!-- <view>{{record.empname}}</view> -->
				</view>
				<!-- <u-line></u-line> -->
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;">
					<u-row justify="space-between" customStyle="margin-top: 10px">
						<u-col span="6">
							<view style="display: flex;align-items: center;">
								<view style="color: #999999;">部门：</view>
								<view>{{record.orgName}}</view>
							</view>
						</u-col>
						<u-col span="6">
							<view style="display: flex;align-items: center;">
								<view style="color: #999999;">职称：</view>
								<view>{{record.jobTitle}}</view>
							</view>
						</u-col>
					</u-row>
					<u-row justify="space-between" customStyle="margin-top: 10px">
						<u-col span="6">
							<view style="display: flex;align-items: center;">
								<view style="color: #999999;">岗位：</view>
								<view>{{record.position}}</view>
							</view>
						</u-col>
						<u-col span="6">
							<view style="display: flex;align-items: center;">
								<view style="color: #999999;">职务：</view>
								<view>{{record.duty}}</view>
							</view>
						</u-col>
					</u-row>
					<u-row justify="space-between" style="align-items: flex-start;" customStyle="margin-top: 10px">
						<u-col span="3">
							<view style="color: #999999;">
								工作总结：
							</view>
						</u-col>
						<u-col span="9">
							<view>{{record.workSummary}}</view>
						</u-col>
					</u-row>
					<u-row justify="space-between" style="align-items: flex-start;" customStyle="margin-top: 10px">
						<u-col span="3">
							<view style="color: #999999;">
								备注：
							</view>
						</u-col>
						<u-col span="9">
							<view>{{record.remarks}}</view>
						</u-col>
					</u-row>
				</view>
				<view style="margin-bottom: 10px;display: flex;align-items: center;margin-top: 15px;">
					<view style="margin-right: 20rpx;">附件信息</view>
					<!-- <view>{{record.empname}}</view> -->
				</view>
				<!-- <u-line></u-line> -->
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;" v-if="firstFile.length!=0">
					<u-row justify="space-between" customStyle="margin-top: 10px" span="12" v-for="(item,index) in firstFile" :key="index" >
						<u-col >
							<view style="display: flex;align-items: center;">
								<view style="color: #1E90FF;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"><a :href="item.attachmenturl">{{item.name}}</a></view>
							</view>
						</u-col>
					</u-row>
				</view>
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;" v-else>用户未上传附件</view>
			</view>
			<view class="list-item" v-if="current==1">
				<view style="margin-bottom: 10px;display: flex;justify-content: space-between;align-items: center;">
					<view>工作计划</view>
				</view>
				<view class="plan-item" v-for="(item,index) in workPlan" :key="item.id">
					<view style="display: flex;align-items: center;margin-bottom: 20rpx;">
						<view style="color: #999999;" class="list-item-index">{{index+1}}</view>
						<view style="color: #999999;">拟定完成工作时间：</view>
						<view>{{item.plannedCompletionDate}}</view>
					</view>
					<u-row justify="space-between" style="align-items: flex-start;" customStyle="margin-top: 10px">
						<u-col span="3">
							<view style="color: #999999;">
								工作计划：
							</view>
						</u-col>
						<u-col span="9">
							{{item.workPlanContent}}
						</u-col>
					</u-row>
					<u-row justify="space-between" style="align-items: flex-start;" customStyle="margin-top: 10px">
						<u-col span="3">
							<view style="color: #999999;">
								备注：
							</view>
						</u-col>
						<u-col span="9">
							{{item.remarks}}
						</u-col>
					</u-row>

				</view>
				<view style="margin-bottom: 10px;display: flex;align-items: center;margin-top: 15px;">
					<view style="margin-right: 20rpx;">附件信息</view>
				</view>
				<!-- <u-line></u-line> -->
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;" v-if="secondFile.length !=0">
					<u-row justify="space-between" customStyle="margin-top: 10px" span="12" v-for="(item,index) in secondFile" :key="index" >
						<u-col >
							<view style="display: flex;align-items: center;">
								<view style="color: #1E90FF;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"><a :href="item.attachmenturl">{{item.name}}</a></view>
							</view>
						</u-col>
					</u-row>
					
				</view>
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;" v-else>用户未上传附件</view>
			</view>
			<view class="list-item" v-if="current==2 && personalScoreList">
				<view class="personalScoreList-item" v-for="(item,index) in personalScoreList" :key="index">
					<view style="margin-bottom: 20rpx;display: flex;align-items: center;padding-left: 10rpx;">
						<view>{{item.contentName}}</view>
					</view>
					<view v-for="(children,key) in item.children" :key="key" style="margin-bottom: 20rpx;"
						class="list-item">
						<view style="margin-bottom: 20rpx;display: flex;">
							<view>最高分：{{children.maxScore}}；</view>
							<!-- <view style="margin-right: 10px;color: #3c9cff;">评分：{{children.supervisorRating}}</view> -->
							<view v-if="source==0 ||source==2">
								<view v-if="record.status == 1 || record.status == -2 || record.status == -3">
									<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.supervisorRating}}</view>
								</view>
								<view v-if="record.status == 2">
									<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.departmentRating}}</view>
								</view>
								<view v-if="record.status == 3">
									<view v-if="record.personnelType == 0">
										
									</view>
									<view v-if="record.personnelType == 1 || record.personnelType == 2">
										<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.supervisorRating}}</view>
									</view>
								</view>
								<view v-if="record.status == 100">
									<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
									
										<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.departmentRating}}</view>
									</view>
								</view>
								<view v-if="record.status == 101">
									<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
									
										<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.branchRating}}</view>
									</view>
								</view>
								<view v-if="record.status == 102">
									<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
										<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.supervisorRating}}</view>
									</view>
								</view>
							</view>
							<view v-if="source==1">
								<view v-if="processStatus == 2 ">
									<!-- 显示部门分数 -->
									<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.departmentRating}}</view>
								</view>
								<view v-if="processStatus == 3 ">
									<!-- 显示领导分数 -->
									<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.supervisorRating}}</view>
								</view>
								<view v-else>
									<view v-if="record.status == 101">
										<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
										
											<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.branchRating}}</view>
										</view>
									</view>
									<view v-if="record.status == 102">
										<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
											<view style="margin-right: 10px;color: #3c9cff;">评分：{{children.supervisorRating}}</view>
										</view>
									</view>
								</view>
							</view>
						</view>
						<u-line></u-line>
						<view style="margin-top: 20rpx;margin-bottom: 20rpx;">{{children.content}} </view>
						<u-line></u-line>
						<view v-if="source==0 || source==2">
							<view v-if="record.status == 1 || record.status == -2 || record.status == -3">
								<view v-if="record.personnelType == 0">
									<view style="display: flex;align-items: center;">
										<view>评分</view>
										<u-slider  v-model="children.supervisorRating" style="width: 480rpx;z-index: 1;" min="0" :max="children.maxScore" showValue></u-slider>
									</view>
								</view>
								<view v-else>暂无</view>
							</view>
							<view v-if="record.status == 2">
								<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view>评分</view>
										<u-slider  v-model="children.departmentRating" style="width: 480rpx;z-index: 1;" min="0" :max="children.maxScore" showValue></u-slider>
									</view>
								</view>
							</view>
							<view v-if="record.status == 3">
								<view v-if="record.personnelType == 0">
									
								</view>
								<view v-if="record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view>评分</view>
										<u-slider  v-model="children.supervisorRating" style="width: 480rpx;z-index: 1;" min="0" :max="children.maxScore" showValue></u-slider>
									</view>
								</view>
							</view>
							<view v-if="record.status == 101">
								<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view>评分</view>
										<u-slider  v-model="children.branchRating" style="width: 480rpx;z-index: 1;" min="0" :max="children.maxScore" showValue></u-slider>
									</view>
								</view>
							</view>
							<view v-if="record.status == 102">
								<view v-if="record.personnelType == 0 ||record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view>评分</view>
										<u-slider  v-model="children.supervisorRating" style="width: 480rpx;z-index: 1;" min="0" :max="children.maxScore" showValue></u-slider>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view style="margin-bottom: 10px;display: flex;align-items: center;margin-top: 15px;">
					<view style="margin-right: 20rpx;">附件信息</view>
					<!-- <view>{{record.empname}}</view> -->
				</view>
				<!-- <u-line></u-line> -->
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;" v-if="thirdFile.length!=0">
					<u-row justify="space-between" customStyle="margin-top: 10px" span="12" v-for="(item,index) in thirdFile" :key="index" >
						<u-col >
							<view style="display: flex;align-items: center;">
								<view style="color: #1E90FF;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"><a :href="item.attachmenturl">{{item.name}}</a></view>
							</view>
						</u-col>
					</u-row>
				</view>
				<view style="background: #ffffff; padding: 20rpx;border-radius: 10rpx;" v-else>用户未上传附件</view>
				<u-modal :show="show" title="退回原因" @confirm="handleConfirm">
					<u-textarea v-model="returnReason" placeholder="请输入退回原因" ></u-textarea>
				</u-modal>
				<u-tabbar @change="change" :placeholder="true" :safeAreaInsetBottom="false" v-if="source==0 ||source==2">
					<view style="display: flex;align-items: center;justify-content: space-between;padding: 0 20rpx;width: 100%;">
						<view>
							<view v-if="record.status == 1 || record.status == -2 || record.status == -3">
								<view v-if="record.personnelType == 0">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationSelfRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationSelfRating >= 95">A1</span>
											<span v-if="calculationSelfRating >= 91 && calculationSelfRating <= 94">A2</span>
											<span v-if="calculationSelfRating >= 86 && calculationSelfRating <= 90">B1</span>
											<span v-if="calculationSelfRating >= 81 && calculationSelfRating <= 85">B2</span>
											<span v-if="calculationSelfRating >= 76 && calculationSelfRating <= 80">B3</span>
											<span v-if="calculationSelfRating >= 71 && calculationSelfRating <= 75">C1</span>
											<span v-if="calculationSelfRating >= 60 && calculationSelfRating <= 70">C2</span>
											<span v-if="calculationSelfRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
								<view v-else>暂无</view>
							</view>
							<view v-if="record.status == 2">
								<view v-if="record.personnelType == 0 ">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationDepartmentRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationDepartmentRating >= 95">A1</span>
											<span v-if="calculationDepartmentRating >= 91 && calculationDepartmentRating <= 94">A2</span>
											<span v-if="calculationDepartmentRating >= 86 && calculationDepartmentRating <= 90">B1</span>
											<span v-if="calculationDepartmentRating >= 81 && calculationDepartmentRating <= 85">B2</span>
											<span v-if="calculationDepartmentRating >= 76 && calculationDepartmentRating <= 80">B3</span>
											<span v-if="calculationDepartmentRating >= 71 && calculationDepartmentRating <= 75">C1</span>
											<span v-if="calculationDepartmentRating >= 60 && calculationDepartmentRating <= 70">C2</span>
											<span v-if="calculationDepartmentRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
								<view v-if="record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationDepartmentRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationDepartmentRating >= 91">A</span>
											<span v-if="calculationDepartmentRating >= 76 && calculationDepartmentRating <= 90">B</span>
											<span v-if="calculationDepartmentRating >= 60 && calculationDepartmentRating <= 75">C</span>
											<span v-if="calculationDepartmentRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
							</view>
							<view v-if="record.status == 3">
								<view v-if="record.personnelType == 0">
									 暂无
								</view>
								<view v-if="record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationSupervisorRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationSupervisorRating >= 91">A</span>
											<span v-if="calculationSupervisorRating >= 76 && calculationSupervisorRating <= 90">B</span>
											<span v-if="calculationSupervisorRating >= 60 && calculationSupervisorRating <= 75">C</span>
											<span v-if="calculationSupervisorRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
							</view>
							<view v-if="record.status == 101">
								<view v-if="record.personnelType == 0">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationBranchRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationBranchRating >= 95">A1</span>
											<span v-if="calculationBranchRating >= 91 && calculationBranchRating <= 94">A2</span>
											<span v-if="calculationBranchRating >= 86 && calculationBranchRating <= 90">B1</span>
											<span v-if="calculationBranchRating >= 81 && calculationBranchRating <= 85">B2</span>
											<span v-if="calculationBranchRating >= 76 && calculationBranchRating <= 80">B3</span>
											<span v-if="calculationBranchRating >= 71 && calculationBranchRating <= 75">C1</span>
											<span v-if="calculationBranchRating >= 60 && calculationBranchRating <= 70">C2</span>
											<span v-if="calculationBranchRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
								<view v-if="record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationBranchRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationBranchRating >= 91">A</span>
											<span v-if="calculationBranchRating >= 76 && calculationBranchRating <= 90">B</span>
											<span v-if="calculationBranchRating >= 60 && calculationBranchRating <= 75">C</span>
											<span v-if="calculationBranchRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
							</view>
							<view v-if="record.status == 102">
								<view v-if="record.personnelType == 0">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationSupervisorRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationSupervisorRating >= 95">A1</span>
											<span v-if="calculationSupervisorRating >= 91 && calculationSupervisorRating <= 94">A2</span>
											<span v-if="calculationSupervisorRating >= 86 && calculationSupervisorRating <= 90">B1</span>
											<span v-if="calculationSupervisorRating >= 81 && calculationSupervisorRating <= 85">B2</span>
											<span v-if="calculationSupervisorRating >= 76 && calculationSupervisorRating <= 80">B3</span>
											<span v-if="calculationSupervisorRating >= 71 && calculationSupervisorRating <= 75">C1</span>
											<span v-if="calculationSupervisorRating >= 60 && calculationSupervisorRating <= 70">C2</span>
											<span v-if="calculationSupervisorRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
								<view v-if="record.personnelType == 1 || record.personnelType == 2">
									<view style="display: flex;align-items: center;">
										<view style="margin-right: 10px;">合计 {{calculationSupervisorRating}} 分</view>
										<view style="color: #f00f00;">
											(
											<span v-if="calculationSupervisorRating >= 91">A</span>
											<span v-if="calculationSupervisorRating >= 76 && calculationSupervisorRating <= 90">B</span>
											<span v-if="calculationSupervisorRating >= 60 && calculationSupervisorRating <= 75">C</span>
											<span v-if="calculationSupervisorRating <= 59">D</span>
											)
										</view>
									</view>
								</view>
							</view>
						</view>
						<view style="display: flex;align-items: center;">
							<u-button style="margin-right: 20rpx;height: 60rpx;" type="primary" @click="handleSubmit" v-if="source==0">提交</u-button>
							<u-button style="margin-right: 20rpx;height: 60rpx;" type="primary" @click="handleSubmit" v-if="source==2">重新打分</u-button>
							<u-button style="height: 60rpx;" type="error" @click="()=>show = true" v-if="source==0">退回</u-button>
						</view>
					</view>
				</u-tabbar>
				<u-tabbar  :placeholder="true" :safeAreaInsetBottom="false" v-if="source==1">
					<view style="display: flex;align-items: center;justify-content: space-between;padding: 0 20rpx;width: 100%;">
						<view style="display: flex;align-items: center;">
							<view style="margin-right: 10px;">合计 {{record.finalScore}} 分</view>
							<view style="color: #f00f00;">
								(
								{{record.assessmentGrade}}
								)
							</view>
						</view>
					</view>
				</u-tabbar>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		GetAssessMentView,
		GetQueryPersonalWorkPlan,
		GetQueryPersonalScore,
		PostSubmitAssessmenteMoloyee,
		PostauditAssessment,
		GetFileApi
	} from '@/api/main.js'
	export default {
		data() {
			return {
				assessMentId: null, //我的待办列表ID  
				record: null,
				workPlan: null, //计划列表
				list: ['工作总结', '工作计划', '考核评分'],
				current: 0,
				personalScoreList: [],
				show:false,
				returnReason:"",
				source:0,
				processStatus:null,
				firstFile:[],
				secondFile:[],
				thirdFile:[]
			}
		},
		onLoad(options) {
			/**
			 * &source=0 我的待办 - 待办列表进来的
			 * &source=1 我的待办 - 办理记录进来的
			 * 
			**/ 
			this.assessMentId = options.id
			this.source = options.source
			if(options.processStatus){
				this.processStatus = options.processStatus
			}
			this.getData()
			this.getworkPlan()
			this.GetFile()
		},
		computed:{
			// 计算属性，计算最高得分
			calculationMaxScore(){
				 return Object.values(this.personalScoreList).reduce((total, item) => {
				        const childrenMaxScoreSum = item.children.reduce((acc, child) => acc + child.maxScore, 0);
				        return total + childrenMaxScoreSum;
				}, 0);
			},
			// 计算属性，计算自评分
			calculationSelfRating(){
				return Object.values(this.personalScoreList).reduce((total, item) => {
				    const childrenMaxScoreSum = item.children.reduce((acc, child) => acc + child.selfRating, 0);
				    return total + childrenMaxScoreSum;
				}, 0);
			},
			// 计算属性，部门评分
			calculationDepartmentRating(){
				return Object.values(this.personalScoreList).reduce((total, item) => {
				    const childrenMaxScoreSum = item.children.reduce((acc, child) => acc + child.departmentRating, 0);
				    return total + childrenMaxScoreSum;
				}, 0);
			},
			// 计算属性，支部评分
			calculationBranchRating(){
				return Object.values(this.personalScoreList).reduce((total, item) => {
				    const childrenMaxScoreSum = item.children.reduce((acc, child) => acc + child.branchRating, 0);
				    return total + childrenMaxScoreSum;
				}, 0);
			},
			// 计算属性，领导评分
			calculationSupervisorRating(){
				return Object.values(this.personalScoreList).reduce((total, item) => {
				    const childrenMaxScoreSum = item.children.reduce((acc, child) => acc + child.supervisorRating, 0);
				    return total + childrenMaxScoreSum;
				}, 0);
			}
		},
		methods: {
			GetFile(){
				   let formdata = new FormData()
				    formdata.append('khid', this.assessMentId)
					  GetFileApi(formdata).then(response=>{
					        response.data.forEach(item=>{
					            item.uid = item.id
								// item.name = (item.name.split('_'))[2]
					        })
					        this.firstFile = response.data.filter(item=> item.dirPosition=='1-0')
					        this.secondFile = response.data.filter(item=> item.dirPosition=='1-1')
					        this.thirdFile = response.data.filter(item=> item.dirPosition=='1-2')
					        console.log('1', this.firstFile)
					        console.log('2', this.secondFile)
					        console.log('3', this.thirdFile)
					    })
			},
			getData() {
				let formData = new FormData();
				formData.append('assessMentId', this.assessMentId);
				GetAssessMentView(formData).then(response => {
					this.record = response.data
					GetQueryPersonalScore(response.data).then(res => {
						const groupedData = {};
						// 把考核内容list 改为树形结构
						res.forEach((item, index) => {
							if (!groupedData[item.contentType]) {
								groupedData[item.contentType] = {
									contentType: item.contentType,
									contentName: item.contentName,
									index: index,
									children: []
								};
							}
							groupedData[item.contentType].children.push(item);
						});
						this.personalScoreList = groupedData || [];
						console.log(this.personalScoreList)
					})
				})
			},
			sectionChange(index) {
				this.current = index;
			},
			getworkPlan() {
				let formData = new FormData();
				formData.append('assessmentId', this.assessMentId);
				GetQueryPersonalWorkPlan(formData).then((res => {
					console.log(res)
					this.workPlan = res.data
				}))
			},
			// 提交
			handleSubmit(){
				const scores = [];
				for (const key in this.personalScoreList) {
					if (this.personalScoreList.hasOwnProperty(key)) {
						const children = this.personalScoreList[key].children;
						if (children && children.length > 0) {
							scores.push(...children);
						}
					}
				}
				let params = {
					employee: this.record,
					subStatus: 1, //状态
					workPlans: this.workPlan, //计划
					scores: scores ,//成绩
					qyAssessmentattachmentList:[]//附件
				}
				PostSubmitAssessmenteMoloyee(params).then(response=>{
					console.log(response)
					if(response.code==200){
						uni.showToast({
							icon:"none",
							title:response.msg
						})
						setTimeout(()=>{
							uni.navigateBack({
								delta: 1
							})
						},1000)
					}
				})
			},
			// 退回弹框
			handleConfirm(){
				let formdata = new FormData()
				formdata.append('assessmentId',this.record.id)
				formdata.append('empname',this.record.empname)
				formdata.append('returnReason',this.returnReason)
				formdata.append('status','back')
				PostauditAssessment(formdata).then(response=>{
					if(response.code==200){
						uni.showToast({
							icon:"none",
							title:response.msg
						})
						
						this.show  = false
						setTimeout(()=>{
							uni.navigateBack({
								delta: 1
							})
						},1000)
					}else {
						uni.showToast({
							icon:"none",
							title:response.msg
						})
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.list-item {
		padding: 30rpx;
		background: #ecf5ff;
		margin-bottom: 30rpx;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}

	.plan-item {
		background: #ffffff;
		padding: 20rpx;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}

	.personalScoreList-item {
		background: #ffffff;
		padding: 20rpx;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}

	.list-item-index {
		display: flex;
		border: 1px solid #5F9EA0;
		width: 40rpx;
		height: 40rpx;
		align-items: center;
		justify-content: center;
		border-radius: 40rpx;
		font-size: 24rpx;
		margin-right: 20rpx;
	}
</style>